Repository navigation
Keep an idle slot's decode rate while the coordinator decays stale rates (trust_status.coordinator_features) - #2703
Merged
Conversation
trust_status gains an optional coordinator_features list. While the connected coordinator's latest trust_status lists decode_rate_age_decay, the heartbeat stops omitting an idle slot's observed_decode_tps after DARKBLOOM_DECODE_RATE_IDLE_MAX_AGE_SECONDS: it sends the rate and its observed_decode_tps_age_ms, and the coordinator decays a stale rate toward the fleet median itself. This removes the alternation between no rate (idle) and an old one (busy) for such a coordinator. Absent, malformed or unknown entries, a later trust_status without the entry, and a disconnect keep today's behaviour; the heartbeat is then unchanged byte for byte. Older coordinators never send the field and are decoded as before. Tests: CoordinatorDecodeRateDecayTests (shared wire cases in Fixtures/Protocol/coordinator_features_wire.json, wire shape, advertisement lifecycle, heartbeat bytes with and without the feature).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
1 task done
jonathan308
changed the base branch from
feat/decode-rate-age-on-heartbeat
to
dev
November 24, 2026 18:51
Conflict in docs/developer/serving-performance-qualification.md only: both sentences kept (the decode rate before a slot's first completed request, then the decode_rate_age_decay advertisement).
This was referenced Nov 24, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The provider half of the coordinator's stale decode-rate decay (follow-up to #2569 and #2672).
trust_statusgains an optionalcoordinator_featureslist of strings. While the connected coordinator's latesttrust_statuslistsdecode_rate_age_decay, the heartbeat stops omitting an idle slot'sobserved_decode_tpsafterDARKBLOOM_DECODE_RATE_IDLE_MAX_AGE_SECONDS. It sends the rate with itsobserved_decode_tps_age_ms(#2672), and the coordinator decays a stale rate toward the fleet median. That ends the alternation between no rate (idle,performance_missingon the coordinator) and an old rate (busy).It does nothing until a coordinator sends the entry, and none does today. The coordinator change that sends it ships separately, default off.
CoordinatorMessage.TrustStatus.coordinatorFeatures(coordinator_features, optional). A malformed value decodes as absent (try?), so atrust_statusis never refused because of it.DecodeRateIdleAge.coordinatorDecays(CoordinatorDecayAdvertisement): set from eachtrust_status(CoordinatorClient+Inbound), cleared on disconnect (CoordinatorClient+Connection).EngineV2Bridge+CapacitypassesDecodeRateIdleAge.effectiveMaximum. That isconfiguredexactly as before, or nil while the feature is advertised.Linked issue
None. Follow-up to #2569 and #2672.
Test plan
059acbf022): the new tests, the shared wire cases and inert declarations they compile against, on the same base. It must fail at exactly the 4 new tests inCoordinatorDecodeRateDecayTests:sharedFixture,wireShape,advertisementLifecycleandheartbeatBytes.CoordinatorDecodeRateDecayTests:sharedFixture: every case inFixtures/Protocol/coordinator_features_wire.jsondecodes. That covers absent, empty, another name, the feature, the feature among others, and a malformed string. Only the two advertised cases turn the idle age off. The coordinator's emission test reads the same file;wireShape: atrust_statuswithout the field (an older coordinator) decodes with nil and re-encodes without the key; the list round-trips;advertisementLifecycle: set by atrust_statuswith the feature, cleared by one without it and by a disconnect reset;heartbeatBytes: for a stale idle slot at 60 s, 1,801 s and 7,200 s, the heartbeat without the feature is byte for byte the heartbeat the process sends today. With the feature, the rate (16) and its age stay on the wire; while fresh, both heartbeats are identical.DecodeRateIdleAgeTestsandProviderAuthorizationProtocolTests.legacyCoordinatorStatusRemainsCompatiblepass unchanged.python3 provider-swift/Tests/test_protocol_fixture_resources.py,python3 scripts/changelog.py check,python3 scripts/docs-impact-check.py --base 4fd38a1a64Components touched
Protocol / interface changes
trust_status.coordinator_features. The matching coordinator side (advertisingdecode_rate_age_decayonly behind its own default-off switch, with the same wire cases) is a separate platform change. No heartbeat field changes.Documentation impact
docs/reference/protocol-messages.mdtrust_statusandobserved_decode_tps,docs/reference/configuration.md,docs/architecture/inference.md,docs/developer/serving-performance-qualification.md)Changelog
changelog.d/coordinator-decode-rate-age-decay.md.Notes
trust_statusreplaces it, and a disconnect clears it, so a coordinator rolled back to one without the feature restores the idle age at its firsttrust_status. Heartbeat tests take a task-local value and never touch it.DARKBLOOM_DECODE_RATE_IDLE_MAX_AGE_SECONDS=0sends today, plus the age feat(provider): the heartbeat sends the published decode rate's own age #2672 already adds.Before And After
flowchart TD subgraph Before A1[idle slot, newest sample > 30 min] --> B1[observed_decode_tps omitted] end subgraph After A2[idle slot, newest sample > 30 min] --> C2{latest trust_status lists decode_rate_age_decay?} C2 -->|no, absent, malformed, disconnected| B2[observed_decode_tps omitted, as before] C2 -->|yes| D2[rate + observed_decode_tps_age_ms sent; coordinator decays it] endRefactor Pass
Refactor pass: no change justified.